Optimal. Leaf size=37 \[ -\frac {i a (d \cot (e+f x))^n \, _2F_1(1,n;n+1;-i \cot (e+f x))}{f n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3673, 3537, 64} \[ -\frac {i a (d \cot (e+f x))^n \, _2F_1(1,n;n+1;-i \cot (e+f x))}{f n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 64
Rule 3537
Rule 3673
Rubi steps
\begin {align*} \int (d \cot (e+f x))^n (a+i a \tan (e+f x)) \, dx &=d \int (d \cot (e+f x))^{-1+n} (i a+a \cot (e+f x)) \, dx\\ &=-\frac {\left (i a^2 d\right ) \operatorname {Subst}\left (\int \frac {\left (\frac {d x}{a}\right )^{-1+n}}{a^2+i a x} \, dx,x,a \cot (e+f x)\right )}{f}\\ &=-\frac {i a (d \cot (e+f x))^n \, _2F_1(1,n;1+n;-i \cot (e+f x))}{f n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.84, size = 166, normalized size = 4.49 \[ -\frac {e^{-i e} 2^{n-1} \left (1+e^{2 i (e+f x)}\right )^{1-n} \left (\frac {i \left (1+e^{2 i (e+f x)}\right )}{-1+e^{2 i (e+f x)}}\right )^{n-1} \cos (e+f x) (a+i a \tan (e+f x)) \, _2F_1\left (1-n,1-n;2-n;\frac {1}{2} \left (1-e^{2 i (e+f x)}\right )\right ) \cot ^{-n}(e+f x) (d \cot (e+f x))^n}{f (n-1) (\cos (f x)+i \sin (f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.90, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {2 \, a \left (\frac {i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} - 1}\right )^{n} e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (i \, a \tan \left (f x + e\right ) + a\right )} \left (d \cot \left (f x + e\right )\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.55, size = 0, normalized size = 0.00 \[ \int \left (d \cot \left (f x +e \right )\right )^{n} \left (a +i a \tan \left (f x +e \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (i \, a \tan \left (f x + e\right ) + a\right )} \left (d \cot \left (f x + e\right )\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \[ \int {\left (d\,\mathrm {cot}\left (e+f\,x\right )\right )}^n\,\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ i a \left (\int \left (- i \left (d \cot {\left (e + f x \right )}\right )^{n}\right )\, dx + \int \left (d \cot {\left (e + f x \right )}\right )^{n} \tan {\left (e + f x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________